<?php
namespace app\model;

use think\Model;

class MemberTransfer extends Model
{

	protected $connection = 'mysql';

	protected $pk = 'id';

	protected $name = 'member_transfer';
	protected $append = [
	    'create_time_text'
    ];

    public function member()
    {
        return $this->hasOne(Member::class, 'id', 'uid');
    }

    public function getCreateTimeTextAttr($value,$data)
    {
        if(isset($data['create_time'])){
            $value = date('Y-m-d',$data['create_time']);
        }
        return $value;
    }

}
